package com.ygqh.baby.ao;

import org.apache.commons.lang.StringUtils;

/**
 * @author: sunshuo
 * @date: 2018/12/12 15:02
 */
public enum CommitStatus {

	/**
	 * 待提交
	 */
	WaitingCommit(0, "未结算"),

	/**
	 * 已提交
	 */
	Commited(1, "已结算");

	private int code;

	private String desc;

	CommitStatus(int code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public int getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

	public String getDesc(String name) {
		return StringUtils.isNotBlank(name) ? CommitStatus.valueOf(name).getDesc() : null;
	}
}
